(function (){
	'use strict';

	angular.module('patientfileApp')
		.controller('MainCtrl', function ($scope, storage, patient) {

			$scope.patients = patient.list;
			storage.bind($scope, 'patients.data', {defaultValue:{}});

			$scope.patientAdd=function(){
				$scope.patients.add();
			}
			$scope.patientRemove=function(id){
				$scope.patients.remove(id);
			}
		})
})();